﻿namespace Loki.Utils
{
    public interface ISettingsAware
    {
        /// <summary>
        /// Called before applying persisted state to the object.
        /// </summary>
        /// <param name="P_Configuration">Settings configuration.</param>
        /// <returns>Return false to cancel applying state.</returns>
        bool OnApplyingState(SettingsConfiguration P_Configuration);

        /// <summary>
        /// Called before persisting object state.
        /// </summary>
        /// <param name="P_Configuration">Settings configuration.</param>
        /// <returns>Return false to cancel persisting state.</returns>
        bool OnPersistingState(SettingsConfiguration P_Configuration);
    }
}
